﻿//
//  GNS_SceneMgr.h
//  MobileManage
//  FuncTion 场景图层管理类
//  Created by mr.l on 16/1/25.
//
//

#ifndef __MobileManage__GNS_SceneMgr__
#define __MobileManage__GNS_SceneMgr__
#include "cocos2d.h"
#include "Enum.h"
#include "TSingleton.h"
#include "GNS_Common.h"
#include "GNS_CursorTextField.h"
#include "GNS_Calendar.h"

USING_NS_CC;
class GNS_SceneMgr : public TSingleton<GNS_SceneMgr>
{
public:
    // Here's a difference. Method 'init' in cocos2d-x returns bool, instead of returning 'id' in cocos2d-iphone
public:
    Scene * replaceScene(SCENE_MOBILE sceneVal);
    Scene * getScene(SCENE_MOBILE sceneVal){return _mapScene.at(sceneVal);}
    Layer  * AddSceneLayer(LAYER_MOBILE layerVal);
    Layer  * getSceneLayer(LAYER_MOBILE layerVal){return _mapLayer.at(layerVal);}
    GNS_CursorTextField * MycreateEditBox(std::string tips, Point pos, float FontSize, Color3B color, int limit, bool encryption);

	CC_SYNTHESIZE(GNS_Calendar*, _calendar, Calendar);
private:
    Scene * _curScene = nullptr;
    Layer * _curLayer = nullptr;
    Map<int, Scene*> _mapScene;
    Map<int, Layer*> _mapLayer;
};
#endif /* defined(__MobileManage__GNS_SceneMgr__) */